{extend name='index/index' /}

{block name='main'}
<div id="tpl-echarts"></div>
<div class="tpl-content-wrapper">

    <div class="container-fluid am-cf">
        <div class="row">
            <div class="am-u-sm-12 am-u-md-12 am-u-lg-9">
                <div class="page-header-heading"><span class="am-icon-home page-header-heading-icon"></span> 表单 <small>Amaze UI</small></div>
                <p class="page-header-description">Amaze UI 有许多不同的表格可用。</p>
            </div>
            <div class="am-u-lg-3 tpl-index-settings-button">
                <button type="button" class="page-header-button"><span class="am-icon-paint-brush"></span> 设置</button>
            </div>
        </div>

    </div>
    <div class="row-content am-cf">


        <div class="row">

            <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
                <div class="widget am-cf">
                    <div class="widget-head am-cf">
                        <div class="widget-title am-fl">我的推广</div>
                        <div class="widget-function am-fr">
                            <a href="javascript:;" class="am-icon-cog"></a>
                        </div>
                    </div>
                    <div class="widget-body am-fr">

                        <form class="am-form tpl-form-line-form" >


                            <div class="am-form-group">
                                <label for="user-name" class="am-u-sm-3 am-form-label">推广链接： <span class="tpl-form-line-small-title"></span></label>
                                <div class="am-u-sm-9">
                                    <input type="text"  value="{$url}" class="tpl-form-input" id="biao1" readonly placeholder="">
                                    <!--<textarea cols="20" rows="10" id="biao1"  value="{$url}">{$url}</textarea>-->
                                    <!--<small>请输入正确的手机号。</small>-->
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label for="user-name" class="am-u-sm-3 am-form-label"> <span class="tpl-form-line-small-title"></span></label>
                                <div class="am-u-sm-9">
                                    <!--<input id="copyUrl2" class="am-btn am-btn-primary tpl-btn-bg-color-success " >点击复制链接</input>-->
                                    <input type="button" class="am-btn am-btn-primary tpl-btn-bg-color-success " onClick="copyUrl2()" value="点击复制代码" />
                                </div>
                            </div>

                            <div class="am-form-group">
                                <label for="user-name" class="am-u-sm-3 am-form-label">推广二维码 <span class="tpl-form-line-small-title"></span></label>
                                <div class="am-u-sm-9">
                                    <img src="{$qrcode}" alt="">
                                </div>
                            </div>










                        </form>
                    </div>
                </div>
            </div>
        </div>



    </div>
</div>
<script>
//    $('#copy').click(function(){
//        console.log(11);
//    })


//    $('#copy').zclip({
//        path: 'js/ZeroClipboard.swf',
//        copy: function(){//复制内容
//            return $('#mytext').val();
//        },
//        afterCopy: function(){//复制成功
//            alert('111');
//            return false;
//        }
//    });

    function copyUrl2()
    {
        var Url2=document.getElementById("biao1");
        Url2.select(); // 选择对象
        document.execCommand("Copy"); // 执行浏览器复制命令
        alert("已复制好，可贴粘。");
    }
</script>


{/block}